package bil.imagem;

import java.awt.Component;
import javax.swing.JCheckBox;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Eduardo Folly
 */
public class ImagemCellRendererCheck implements TableCellRenderer {

    private JCheckBox check = new JCheckBox();

    public ImagemCellRendererCheck() {
        super();
        check.setOpaque(false);
    }

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {

        Boolean b = (Boolean) value;
        check.setSelected(b);

        return check;

    }
}
